import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/purchase/purchase-sku/list`,
      method: 'post',
      data
    })
  },
  // 更新预计到货日期
  changeDeliver(data) {
    return request({
      url: `/v1/purchase/purchase-sku/change-deliver`,
      method: 'post',
      data
    })
  },
  // 更新跟进备注
  updateRemark(data) {
    return request({
      url: `/v1/purchase/purchase-sku/batch-update-remark`,
      method: 'post',
      data
    })
  },
  // 手动完结
  completePurchase(data) {
    return request({
      url: `/v1/purchase/purchase-sku/complete-purchase-sku`,
      method: 'post',
      data,
      returnData: true
    })
  },
  // 预览欧英代标签
  previewLabel(data) {
    return request({
      url: `/v1/purchase/purchase-sku/batch-preview-label`,
      method: 'post',
      data,
    })
  },
  // 下载欧英代标签
  downloadLabel(data) {
    return request({
      url: `/v1/purchase/purchase-sku/batch-download-label`,
      method: 'post',
      data,
      responseType: 'blob',
    })
  },
  // 特采入库
  purchaseSku(params) {
    return request({
      url: `/v1/purchase/purchase-sku/special-purchase`,
      method: 'get',
      params
    })
  },
  // 预计发货时间变更记录
  deliverTimeRecord(params) {
    return request({
      url: `v1/purchase/purchase-sku/deliver-time-record`,
      method: 'get',
      params
    })
  },
}
